package com.ruoyi.common.redis.message;

import org.springframework.data.redis.connection.Message;
import org.springframework.data.redis.connection.MessageListener;
import org.springframework.stereotype.Component;

// 消息订阅者
@Component
public class MessageSubscriber implements MessageListener {
    @Override
    public void onMessage(Message message, byte[] pattern) {
        String receivedMessage = message.toString();
        // 处理接收到的消息
        System.out.println("Received message: " + receivedMessage);
    }
}

